<%@ page language="java" contentType="text/html; charset=utf-8"  pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<div id="page-content" class="page-content">
		<div class="panel panel-default oparePanel">
			<div class="panel-body">
				<div class="opare">
					<input type="button"  value="+" class="btn_add" onclick="menuUrl('work/add/view', 'work/add:add');" />
				</div>		
			</div>
		</div>
		
		<div class="portlet-body">
			<div class="table-scrollable">
				<table class="table table-condensed flip-content">
					<thead class="flip-content">
						<tr>
							<th width="10%">机构</th>
							<th width="10%">部门</th>
							<th width="10%">加班日期</th>
							<th width="10%">加班用户</th>
							<th width="10%">加班时间</th>
							<th width="10%">状态</th>
							<th width="15%">加班原因</th>
							<th width="12%">申请时间</th>
							<th width="15%" class="text-center">操作</th>
						</tr>
					</thead>
					<tbody id="select_tbody">
					   <c:if test="${result.code eq 'SUCCESS' }">
					     <c:forEach items="${result.data.rows}" var ="row" varStatus="status">
						     <tr>
								 <td width="10%" class="">${row.corpName }</td> 
								 <td width="10%" class="">${row.deptName }</td> 
								 <td width="10%" class=""><fmt:formatDate value="${row.day }" pattern="yyyy-MM-dd" /></td>
								 <td width="10%" class="">${row.userName }</td>
								 <td width="10%" class="">${row.onTime }-${row.offTime }</td>
									 <c:choose>  
									   <c:when test="${row.status eq '1'}"> 
									     <td width="10%" class="">待审批</td>
									   </c:when>  
									   <c:when test="${row.status eq '2'}"> 
									     <td width="10%" class="">已审批</td>
									   </c:when>  
									   <c:when test="${row.status eq '3'}"> 
									     <td width="10%" class="">审批失败</td>
									   </c:when>  
									</c:choose> 
								<td width="15%" class="">${row.renson }</td>
								<td width="12%" class=""><fmt:formatDate value="${row.applyTime }" pattern="yyyy-MM-dd HH:mm:ss" /> </td>
								<td width="15%" class="text-center">
								   <a href="javascript:void(0);" onclick="workAdd.detail('${row.id}');" class="a-detial">详情</a>
								  <%--  <c:if test="${row.status eq '2'}"> 
								     <a href="javascript:void(0);" onclick="workAdd.delete('${row.id}');" class="a-delet">取消</a>
								   </c:if> 
								   <c:if test="${row.status ne '2'}"> 
								      <a href="javascript:void(0);" class="a-delet disabled">删除</a>
								   </c:if> 
								   --%>
								</td>
							</tr>
					    </c:forEach>
					   </c:if>
		
					</tbody>
				</table>
			</div>
		</div>
</div>

<c:if test="${result.code eq 'SUCCESS' }">
  
  <script type="text/javascript">
		  

    Page.navigation('page', 'work/add/view', 'work/add:page', '${result.data.pageSize}', '${result.data.total}', '${result.data.pageCount}', '${result.data.currPage}', 'menuUrl');

  </script>
  
  <div id="page" class="page"> </div>

</c:if>

